package com.iwhalecloud.bss.kite.cucc.spec.impl.query;

import com.iwhalecloud.bss.kite.dataservice.api.IQueryOfferFlowConfigService;
import com.iwhalecloud.bss.kite.dataservice.entity.flow.OfferFlowConfig;
import com.iwhalecloud.bss.kite.dataservice.mapper.flow.OfferFlowConfigMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service("spec.queryOfferFlowConfigService")
public class OfferFlowConfigQueryService implements IQueryOfferFlowConfigService {

    @Resource
    private OfferFlowConfigMapper offerFlowConfigMapper;

    @Transactional(rollbackFor = Exception.class)
    @Override
    public List<OfferFlowConfig> listOfferFlowConfigsByOfferId(String offerId) {
        return offerFlowConfigMapper.listOfferFlowConfigByOfferId(offerId);
    }

    @Transactional(rollbackFor = Exception.class)
    @Override
    public List<OfferFlowConfig> listOfferFlowConfigsByOfferType(String offerType) {
        return offerFlowConfigMapper.listOfferFlowConfigByOfferType(offerType);
    }
}
